For many business enterprises, it is important to have uninterrupted access or use of a database. On the other hand, a database server managing access to a database needs to be shutdown occasionally for various reasons. One common reason is that a database server requires either hardware and/or software maintenance. While the database server is shut down, the database is not available to clients via the database server. An important problem to managing access to a database is to achieve uninterrupted availability of the database while allowing a database server to be occasionally shut down.
An effective approach for this problem is to use multiple database servers for access and management of a database. The availability of a database persists even though one of the database servers is shutdown.
When shutting down a database server, one issue with which to contend is how to handle existing sessions that already exist on the database server and how to handle requests for new sessions made after the database server commences shutting down. The requests for new sessions are handled effectively by establishing the new sessions on a database server that is not being shut down. Handling the existing sessions is problematic for reasons that stem from the need to terminate existing sessions and how the existing sessions are terminated.
The existing sessions are terminated in various ways. The sessions may be terminated by waiting for the user for which the session is established to terminate the session, or by forcibly terminating the session before the session is user-terminated. The former has the disadvantage of deferring shutdown for arbitrary and possibly prolonged periods of time. The latter has the disadvantage of being more disruptive to a user and/or a client application of the database.
One measure that can reduce the impact on existing sessions is to, in advance of shutdown, direct sessions away for the database server to be shut down to other database servers that will not be shut down. While this measure reduces the number of existing sessions impacted, the measure does not guarantee that there is no waiting for user termination or that a session may not have to be forcibly terminated.
Based on foregoing, there is a need for a new approach to shutting a database server.
The approaches described in this section are approaches that could be pursued, but not necessarily approaches that have been previously conceived or pursued. Therefore, unless otherwise indicated, it should not be assumed that any of the approaches described in the section qualify as prior art merely by virtue of their inclusion in this section.